import request from '@/utils/request'

// 查询社会培训管理列表
export function listTrainings(query) {
  return request({
    url: '/village/trainings/list',
    method: 'get',
    params: query
  })
}

// 查询社会培训管理详细
export function getTrainings(id) {
  return request({
    url: '/village/trainings/' + id,
    method: 'get'
  })
}

// 新增社会培训管理
export function addTrainings(data) {
  return request({
    url: '/village/trainings',
    method: 'post',
    data: data
  })
}

// 修改社会培训管理
export function updateTrainings(data) {
  return request({
    url: '/village/trainings',
    method: 'put',
    data: data
  })
}

// 删除社会培训管理
export function delTrainings(id) {
  return request({
    url: '/village/trainings/' + id,
    method: 'delete'
  })
}
